package ru.caporegim.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import ru.caporegim.service.calc.Calculator;

import javax.annotation.Resource;

/**
 * Created by IntelliJ IDEA.
 * User: senior
 * Date: 06.10.12
 * Time: 22:08
 * To change this template use File | Settings | File Templates.
 */
public class CalculatorFacade {

    private Calculator calculator;
    @Autowired
    @Qualifier("simpleCalculator")
    //@Resource(name="simpleCalculator")
    public void setCalculator(Calculator calculator) {
        this.calculator = calculator;
    }

    public long sum(long a, long b) {
        return calculator.sum(a, b);
    }
}
